import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //小斯默认头像
    xsPhoto: 'https://img1.baidu.com/it/u=4178695588,366271647&fm=253&fmt=auto&app=138&f=JPEG?w=499&h=500',
    //用户头像
    userPhoto: 'https://img2.baidu.com/it/u=4244269751,4000533845&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1658336400&t=44ceeda5baf598076d7fe1483a115ff8',
    userName: ''
  },
  mutations: {
    SET_USER_PHOTO(state, value) {
      this.state.userPhoto = value;
    },
    SET_USER_NAME(state, value) {
      this.state.userName = value;
    }
  },
  actions: {},
  modules: {}
})
